Skip to content

fix(service-automation)!: automation variable keys cannot use reserved object segments, and one run's writes never change a flow's defaults - #38001

Draft
objectstack-fleet[bot] wants to merge 9 commits into
mainfrom
claude/sec1-xrjw-door
Draft

objectstack-fleet[bot] wants to merge 9 commits into
mainfrom
claude/sec1-xrjw-door

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no published skill teaches a flow variable name, assignment target, screen field name or resume-signal key rule (checked: git grep over skills/** for __proto__, constructor, prototype, and the automation skill's variable, outputVariable, assignment, screen-field and resume text; the only hits are skills/objectui expression-sandbox lists, unrelated)

维护者速读

  • 用户能看到什么变化:流程作者把变量名(或名字里以点分隔的任一段)写成三个保留词之一时,注册和保存会被拒并指出每一处;恢复暂停中的流程时,提交的数据里带这类键会被拒,流程保持暂停;普通流程无感。
  • 为什么做:自动化流程的变量命名与运行之间的隔离加固,安全席位按维护者授权接手的高危项。
  • 出错会怎样:已有流程若恰好用了这些名字会注册失败,改名后重新保存即可;整个改动可以直接撤回。
  • 要你做什么:审阅后由授权审批人批准,再由席位落地。

What changes

Three rules, stated once each in the automation service:

  1. A flow variable key may not use __proto__, constructor or prototype as its name or as any dot-separated part of it — at registration. Registration, and the stored pass that previews it, judges every key a flow names: each declared variable's name, each assignment node's targets in every shape, each node's outputVariable / iteratorVariable / indexVariable / errorVariable, and each screen field's name. The refusal names every such key and where it sits. A name that only contains one of the words (constructor_name) is unaffected.
  2. A resume signal may not carry such a key. Each key of output and of inputs is judged first, before anything reads the submitted values; the answer is INVALID_SIGNAL (400), nothing is applied, and the run stays paused for a valid submission. The resume chokepoint refuses the same keys for every caller.
  3. One run's writes never change a flow's defaults or another run's values. Each run binds its own copy of an object or list default. A dotted write whose head names a value the run holds is read back by that run and leaves the held value as it was (the flow's default, the trigger's record, $record). With no durable store, a resumed run works on its own copy of its variables, as a stored run does.

Commits: the door half (rules 1 and 2), then rule 3, then the docs page and changeset, then one more pin for the chokepoint, then a dogfood pin updated, then the published prose and the ledger entry.

  • Dogfood pin updated in this PR: packages/qa/dogfood/test/flow-condition-scope-keys.dogfood.test.ts (a screen resume's inputs and output bags) stated the earlier accept set and goes red under this change; it now states the ruled one — refused with INVALID_SIGNAL, the run stays paused, and the valid submission then lands.
  • Published prose brought in line with the rule (prose only, no schema shape change): the assignment config's comments in packages/spec/src/automation/builtin-node-config.zod.ts, the INVALID_SIGNAL description in packages/spec/src/contracts/automation-service.ts, and the resume route's status note in packages/runtime/src/domains/automation.ts.
  • ADR-0087 ledger: one semantic entry, flow-variable-key-reserved-segment-refused (packages/spec/src/migrations/entries/semantic/), so os migrate meta and the upgrade guide carry the rename; the changeset is marked registered with it. The changeset is minor on @objectstack/service-automation (the kind narrowed), patch on @objectstack/spec and @objectstack/runtime.

Tests

  • src/variable-key-reserved-segments.test.ts — rules 1 and 2: each sample is refused at registration and listed by the stored pass; each resume sample is refused on a screen (the screen's conditions are never evaluated, the paused variables are byte-identical, and the valid submission then lands) and on a pause with no input contract; the chokepoint refuses them as a whole. Controls: ordinary dotted keys and names containing the words register, run and resume.
  • src/run-values-isolation.test.ts — rule 3: object and list defaults (dotted writes, list index and length, a node that changes the value in place), the trigger record against $record, and a paused run with and without a store.
  • Red before the fix: 38 failed / 5 passed (the controls) on the unfixed tree, every failure an assertion on the rule.
  • After: both files 50/50; the whole package suite 299 files / 4392 tests passed at 5cd060c9d6d (existing flow suites with ordinary dotted keys unchanged). The commits after it change no service-automation source.
Reverse verification — each new pin, one change reverted at a time (counts only)

Each leg through scripts/ablation-replace.mjs (anchor x1 -> x0, restored to HEAD, git diff HEAD empty after every leg), on the two new files (50 tests):

Reverted Red Which pins
the registration check 18 every authoring case, registration and stored pass
the resume door's first check 6 every screen case; the no-contract pause stays refused by the chokepoint
the chokepoint's check 6 every chokepoint case; resume stays refused by the first check
the scope's copy on descent 1 the record case
the per-run copy of a default 2 the in-place cases
both copies together 7 every default case and the record case
the held run's copy 1 the paused run with no store

Acceptance notes

  • The authoring door judges the keys a flow names as variables; node ids are not judged by it.
  • A security item is with the owner seat.

Verification

First read (by risk):

  1. packages/services/service-automation/src/run-resume.ts — the resume-door block just before the screen contract.
  2. packages/services/service-automation/src/flow-registration-checks.ts — validateVariableKeySegments.
  3. packages/services/service-automation/src/dag-traversal.ts — the descent in celScope and the default seeding.

Two-minute check: pnpm --filter @objectstack/service-automation exec vitest run src/variable-key-reserved-segments.test.ts src/run-values-isolation.test.ts — expect Tests 50 passed (50).

Local gates at the final head c213f8f
  • @objectstack/service-automation typecheck (tsc and the test-layer typecheck): exit 0 (at 5cd060c; its sources are unchanged since). @objectstack/spec build, check:generated (every artifact up to date) and typecheck: exit 0; src/migrations tests 203/203. @objectstack/runtime typecheck: exit 0.
  • check:adr-0087-registration: exit 0, registered flow-variable-key-reserved-segment-refused (new here). check-changeset-no-major: exit 0 (its level axis reads the PR body in CI).
  • The derived gate list (dispatch-gates --commands, 125 families): 122 exit 0; 3 NOT MEASURED, prerequisite not met on this box (exit 3): check:skill-examples (no client SDK build), check:dual-build-cjs-loads (no full build), check:type-check-debt (its inner lock call queued behind this branch's own battery). The non-self-test check:dev-prereqs reads this worktree as not fully built (39 packages without dist), the same prerequisite. CI runs all of them. --ran reconciliation: 125 derived, 125 run, 0 unrun.
Dogfood battery at the final head c213f8f
  • Closure built at that head (pnpm --filter '@objectstack/dogfood^...' build, exit 0), then pnpm --filter @objectstack/dogfood test under the verify lock, no shard: exit 0 · Test Files 490 passed / 3 skipped (493) · Tests 4144 passed / 68 skipped (4212).
  • An earlier full run at 5cd060c had two reds, both in the updated dogfood pin named above.

Generated by Claude Code

…d object segments

A flow variable key, and every dot-separated part of one, may not be
`__proto__`, `constructor` or `prototype`. Two doors hold the rule:

- registration (and the stored pass that previews it) refuses a flow that
  declares, assigns or binds such a key, naming each site;
- resume refuses a signal whose `output` or `inputs` carry such a key with
  INVALID_SIGNAL, before anything reads the submitted values, so nothing is
  applied and the pause stays live.

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
…lts or another run's values

- A dotted write whose head names a value the run holds lands in a copy
  the expression scope owns; the run reads it back, and the held value
  (a declared default, the trigger record, the value `record` and
  `$record` share) keeps what it was.
- Each run binds its own copy of an object or list default.
- With no durable store, a paused run is handed out with its own copy of
  its variables, as a stored run is, so a resume writes into nothing the
  parked run shared.

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
…ent keys for every caller

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
… and stays paused

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/runtime, @objectstack/service-automation, @objectstack/spec, touching 47 documentable anchor(s).

15 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/actions-as-tools.mdx (via nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments))
  • content/docs/api/client-sdk.mdx (via AutomationResult (symbol, a top-level interface), dryRun (symbol, a top-level function), /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/api/wire-format.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/automation/approvals.mdx (via nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments))
  • content/docs/automation/flows.mdx (via AutomationResult (symbol, a top-level interface), INVALID_SIGNAL (literal, a string literal in resumeInternal), errorVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), idVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), indexVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), iteratorVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments), outputVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS))
  • content/docs/data-modeling/currency.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it), /:object/import/jobs (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/data-modeling/fields.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/data-modeling/import-mappings.mdx (via dryRun (symbol, a top-level function), /:object/import (route, bridged from symbol dryRun — its route source's handler names it), /:object/import/jobs (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/kernel/cluster.mdx (via AutomationEngine (symbol, a top-level class), nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments))
  • content/docs/kernel/contracts/metadata-service.mdx (via dryRun (symbol, a top-level function))
  • content/docs/kernel/runtime-services/examples.mdx (via outputVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS))
  • content/docs/permissions/authentication.mdx (via dryRun (symbol, a top-level function))
  • content/docs/permissions/system-context.mdx (via handleAutomationRequest (symbol, a top-level function), /:object/import (route, bridged from symbol dryRun — its route source's handler names it), /:object/import/jobs (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/protocol/knowledge.mdx (via dryRun (symbol, a top-level function))
  • content/docs/protocol/objectql/state-machine.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it), /:object/import/jobs (route, bridged from symbol dryRun — its route source's handler names it))

⛔ 12 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v12.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/releases/v14.mdx (via dryRun (symbol, a top-level function))
  • content/docs/releases/v16.mdx (via AutomationEngine (symbol, a top-level class))
  • content/docs/releases/v17/17-0.mdx (via AutomationEngine (symbol, a top-level class), nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments))
  • content/docs/releases/v17/17-1.mdx (via AutomationResult (symbol, a top-level interface), nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments))
  • content/docs/releases/v17/17-3.mdx (via AutomationResult (symbol, a top-level interface), dryRun (symbol, a top-level function))
  • content/docs/releases/v17/17-6.mdx (via AutomationEngine (symbol, a top-level class), AutomationResult (symbol, a top-level interface), /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/releases/v17/17-7.mdx (via INVALID_SIGNAL (literal, a string literal in resumeInternal))
  • content/docs/releases/v18/18-0.mdx (via errorVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), idVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), indexVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), iteratorVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), outputVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS))
  • content/docs/releases/v18/18-1.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/releases/v18/18-2.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/releases/v18/18-3.mdx (via dryRun (symbol, a top-level function))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 182 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 8d34c4404f951410083a6caebd6ad8003ea3423d → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 845a8eab44db5dfb256d3a0c9335337ee0063dfa — the merge of head 82e81476d6c0504f48946e53f0938773584ce359 into base 8d34c4404f951410083a6caebd6ad8003ea3423d, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 845a8eab44db5dfb256d3a0c9335337ee0063dfa && git checkout 845a8eab44db5dfb256d3a0c9335337ee0063dfa
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8d34c4404f951410083a6caebd6ad8003ea3423d 82e81476d6c0504f48946e53f0938773584ce359 && git checkout -B drift-repro 8d34c4404f951410083a6caebd6ad8003ea3423d && git merge --no-ff 82e81476d6c0504f48946e53f0938773584ce359

node scripts/docs-audit/affected-docs.mjs --json 8d34c4404f951410083a6caebd6ad8003ea3423d

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 8d34c4404f951410083a6caebd6ad8003ea3423d → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…mes and INVALID_SIGNAL are described; declare the narrowing

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#1 · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c213f8fb80de083b3dfde0d7dcb3b63af1439c31
Local-runs: none
Scope: packages/spec/src/automation/builtin-node-config.zod.ts, packages/spec/src/contracts/automation-service.ts, packages/spec/src/migrations/entries/semantic/19.flow-variable-key-reserved-segment-refused.ts + packages/services/service-automation/src/scope-key-segments.ts, packages/services/service-automation/src/flow-registration-checks.ts, packages/services/service-automation/src/engine.ts, packages/services/service-automation/src/run-resume.ts, packages/services/service-automation/src/dag-traversal.ts, packages/services/service-automation/src/variable-key-reserved-segments.test.ts, packages/services/service-automation/src/run-values-isolation.test.ts, packages/qa/dogfood/test/flow-condition-scope-keys.dogfood.test.ts, packages/runtime/src/domains/automation.ts
Security-touching: yes
Rule-change-verified: none

Inputs: the governing ruling (two halves: the door, and P2), the PR body, its 14-file list, the net diff 02ed8408450..c213f8fb80d, and the head's check-runs. Read-only: every statement below is read from the tree at the head; nothing was built or run. Prose faces (.changeset/automation-variable-keys-reserved-segments.md, content/docs/automation/flows.mdx) read for ② and accuracy only. Mechanism-level detail is held privately with the security seat; this record stays at the rule.

Gate verdicts: every completed check-run on this head is success or skipped, except the first Check Changeset run (failure, 15:04Z), superseded by the later one (success, 16:34Z), which governs.

① Derived judgments

  • Authored flows that change answer. One check, validateVariableKeySegments, sits in the shared registrationChecks list, so registerFlow and the stored pass judge one set by construction. It judges, in every graph collectFlowGraphs returns: each declared variable's name; an assignment node's targets in the three shapes its executor reads; outputVariable / iteratorVariable / indexVariable / errorVariable on a node of any type; each screen fields[].name. A flow naming a key with one of the three words as its name or as a dot-separated part moves from registered to refused, every site named.
  • Nothing refused beyond the three words. The match is exact per part after a split on .: constructor_name, prototype_count and a differently-cased spelling are untouched (the control cases pin the first two, at registration, on a run and on a resume). Two small supersets, both inside "a key the flow names": the four …Variable keys are judged on every node type whether or not that type binds them, and a degenerate legacy-array entry is judged by a slightly wider name pick than the executor's (N3).
  • The judged set is not every key a flow names — see M1.
  • Resume calls that change answer. Every key of output and of variables (the REST body's inputs and its alias, the MCP resume's values) with such a part now answers INVALID_SIGNAL (400). For output that is accepted → refused. For inputs on a screen with declared fields it is a change of code inside the same 400 (INVALID_SCREEN_INPUT → INVALID_SIGNAL), as the updated dogfood pin states. Engine-built continuation signals are judged too (S1).
  • P2 is a behaviour change, not an accept-set change: a declared object or list default is copied per run; a dotted write under a held value lands in a copy the expression scope owns; an in-memory suspension is handed out with its own variables.
  • Spec prose edits change no shape and no generated artifact. The two hunks in builtin-node-config.zod.ts are // comments (no .describe() text); the hunk in automation-service.ts is one JSDoc paragraph on AutomationResult.code. INVALID_SIGNAL is an existing code that gains a documented cause; it is already in the retryable-refusal set, so a delegating parent stays parked on it.
  • The ledger entry is reachable as the gate expects. Semantic entries are discovered by directory (the registry is generated); the file sits beside its 19.* siblings, matches the spec's 19.0.0-next.0 step, and carries no relevantWhen, which is right for a surface that includes a runtime request body. The changeset marker names its id; the ledger-synchrony gates and the latest Check Changeset run are green on this head.

② Semver level

  • @objectstack/service-automation: minor with a ! title and two BREAKING bullets: the level this repo's sibling narrowings carry on the 19 line (35143-data-model-publish-checks.md, 36595-related-list-key-under-arrangement.md). Holds.
  • @objectstack/spec: patch for prose plus one registered ledger entry: the same pairing those siblings use. Holds. @objectstack/runtime: patch covers a comment-only hunk; harmless.
  • Clause-②: no (narrowing) holds: no hunk widens an accept set or adds a capability. Metadata-protocol: narrowed holds: authorable flow metadata that registered is now refused, with no schema shape change.
  • ADR-0087 registered flow-variable-key-reserved-segment-refused: marker, entry id and file agree. The entry's surface, replacement and reason state the rule only. Its acceptanceCriteria ("os migrate meta --stored lists no flow with such a key") can be met while a flow M1 covers is still affected; it becomes exact when M1 is fixed.
  • FROM → TO: the first two bullets carry FROM, TO and the fix. Two accuracy points: N2 (the resume bullet's FROM) and S4 (the third bullet's "Nothing to change").

③ Boundary flags

  • (a) Registration sites. Declared names, assignment targets in all three shapes, the four …Variable keys and screen field names are judged, and the stored pass reads the same check. Not every site is: M1.
  • (b) Resume. The refusal is the first statement after the suspension is loaded and any delegation is resolved, ahead of refuseInvalidScreenInput (the screen contract and its visibleWhen) and ahead of applyResumeSignal. Nothing earlier reads a caller's output or variables (the one earlier reader answers on the engine's own marker first). It returns before the suspension is consumed, so the run stays paused. applyResumeSignal refuses the same keys as a whole, and both of its callers are covered. Every door found reaching it (the REST resume route, the MCP resume, the wait-node timers, a caller's signal delegated down to a subflow child) goes through resume → resumeInternal. Holds for caller signals; for the engine's own signals see S1.
  • (c) P2 copies. Defaults: deep-copied at seeding, arrays and plain objects at every depth. Dotted writes: the scope tracks the containers it made per build and descends into a one-level copy of anything else, so every write lands in an object the scope owns; a list stays a list, any other object becomes a prototype-free copy. Held runs: the only two direct reads of the in-memory cache both go through the copy. One path still shares a held object: S2. Cost: one shallow copy per held object per scope build, and only when a dotted key descends into it; one deep copy per object/list default per run; one deep copy of all variables per in-memory load, on engines with no store or a run the store never took. Linear and acceptable; N1 for one edge.
  • (d) Authoring lint door. os validate and FlowSchema.parse do not apply the rule: the spec comments in this diff say so in words ("this schema accepts"). The ruling names registration, the stored pass and resume, so it is not owed here. Residual R1: an author meets the rule at registration, not at validate; a lint rule is a follow-up for the security seat to file.
  • Dev flag — "node ids are not judged by the authoring door". Answered in part, escalated in part. A node id heads every key a node's output is stored under, and this same file's existing enumeration of names a node binds (flowNodeBoundNames) counts it. Whether the ruling's "variable keys" takes node ids in is a contract call: escalated to the security seat, not decided here. Whichever way it goes, the two doors must give one answer for one key (S1).
  • Dev flag — "a security item is with the owner seat". Noted; nothing to answer on the public face.
  • Author. objectstack-fleet[bot]. No auto-merge is armed on this head (the PR is a draft), so no disarm is owed.
  • SQL push-down (AGENTS.md). n/a: the diff adds no data access, no id materialisation and no in-app join.

④ Design judgment

The ruling, sentence by sentence.

  • "Variable keys cannot use a reserved segment as the whole name or any dot-separated part." The predicate is right: exact match per part, empty parts included. Bracketed and indexed spellings are either refused by a dotted part or are one literal segment that no scope walk reads as a path (both walks split on . only). Case variants and look-alike code points are different property names and are correctly left alone.
  • "Refused at flow registration and in the stored pass." One check, two readers: the same set by construction. The set itself falls short.
    • M1 (must-fix) — on two authoring shapes a flow that names a key with a reserved segment still registers and is not listed by the stored pass. On one of them the flow then binds such a key at run time; on the other it registers and pauses, and no submission can complete it. Held privately with the security seat. The changeset, the docs page and the ledger entry say registration judges every key a flow names; that sentence is not true at this head.
  • "Refused in a resume signal before anything reads the submitted values, the run staying paused." Holds for every caller signal, at the first check and again at the chokepoint.
    • S1 (should-fix) — the chokepoint judges the engine's own continuation signals on the stated ground that their keys are names the authoring door already holds (reservedResumeSignalKeys docblock). That ground does not hold for every key the engine builds: on one flow shape the door registers, the engine's own continuation is refused and the run parks with no valid submission able to move it. Held privately with the security seat. Tied to the node-id escalation in ③.
  • "One run's writes never change a flow's declared defaults, the trigger's record or another run's values." Defaults: held on every path read (seeding copy, dotted writes, a node that changes the value in place, the next run). Another run's values through a pause: held with and without a store.
    • S2 (should-fix) — for the trigger's record the rule is held for a dotted write and for a run resumed from a pause, and not on one further path. Held privately with the security seat. The docs page and the changeset state the wider rule without that limit; either the tree or the prose moves, and which is the ruling's to say.
  • Keys produced at run time rather than authored (a trigger record's own field names, a node's output keys): no door judges them, by design; what holds for them is the scope rule (prototype-free containers, the skipped segment) plus this diff's copy on descent. Named as residual R2, not a finding.
  • Would the pins catch a regression? Resume: yes for caller signals — six samples on a screen (the conditions never evaluated, the paused variables byte-identical, the valid submission landing), on a pause with no input contract, at the chokepoint, and through the HTTP route in the dogfood pin. P2: defaults, the record's dotted write, and a pause with and without a store.
    • S3 (should-fix) — the authoring pin does not hold the door's site list. Its nine cases cover declared names, the assignment map and bare shapes, one outputVariable and one screen field. There is no case for the legacy-array assignment shape, iteratorVariable, indexVariable, errorVariable or a key inside a nested graph, and no enumeration pin against the spec's own list of binding positions; removing any of those branches leaves both new files green. The resume side has no case for a signal delegated to a subflow child or for an engine-built signal.
    • S4 (should-fix, prose) — the changeset's third bullet ends "Nothing to change" and the docs say a dotted write "is read back by that run". The two scope builders differ: an expression reads the write back from the scope's copy; a text hole over the same path reads the held value, because the text scope never merges a flat key into a variable. A flow that read a dotted write through a text hole or through $record changes on upgrade; the bullet should say which reader reads it back and carry a FROM → TO.
    • N1 (nit) — copyHeldValue has no guard for a value that refers to itself; a suspension holding one fails its in-memory load, reported under a store-unavailable code on an engine with no store. SuspendedRun documents its fields as JSON-serialisable, so this is outside the stated contract.
    • N2 (nit) — the resume bullet's "FROM: such a key was accepted" is exact for output; for inputs on a screen with declared fields the call was already a 400 under another code.
    • N3 (nit) — the door picks a legacy-array entry's name as "the first of variable / name / key that is a non-empty string"; the executor and the spec's flowAssignmentTargets pick "the first that is not null". The door is the superset, so nothing slips; it can refuse an entry the executor binds nothing for.

One must-fix (M1), four should-fix (S1–S4), three nits. The resume door and the default-isolation half hold as ruled; the authoring door does not yet refuse every key a flow names, so the narrowing is not delivered whole at this head.

Implemented-by: claude/sec1-xrjw-door
Reviewed-by: session_01ASNY8XNef4ywkQio6S9ju4

VERDICT: FAIL

… registration, exempt the engine's own continuations at resume, and give each run its own trigger record

- Registration judges node ids, object-form screen idVariable, and each
  name with surrounding whitespace trimmed; the judged positions are held
  equal to the spec's binding positions.
- Resume judges a caller's signal only; the engine's own continuations
  still complete.
- Each run binds its own copy of the trigger record.
- A run value that contains itself is refused by the copy by name, and a
  held run carrying one still resumes.

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl and removed size/l labels Nov 27, 2026
…s own record copy carries the declared lookups

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants